package com.metrictracker.model;

import java.util.Date;

import javax.persistence.Id;

import com.googlecode.objectify.Key;

public class MetricValue {

	@Id Long id;
	Key<Metric> metricKey;
	Date timeFrame;
	long value;

	public MetricValue() {}
	
	public MetricValue(Metric metric, Date timeFrame, long value) {
		this.metricKey = metric.getKey();
		this.timeFrame = timeFrame;
		this.value = value;
	}
	
	public void setMetric (Metric metric) {
		metricKey = metric.getKey();
	}
	
	public Date getTimeFrame() {
		return timeFrame;
	}

	public void setTimeFrame(Date timeFrame) {
		this.timeFrame = timeFrame;
	}

	public long getValue() {
		return value;
	}

	public void setMetricValue(long value) {
		this.value = value;
	}
}
